home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
jjbqc.zip
/
JJBSHOW3.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-04
|
5KB
|
122 lines
/***************************************************************************
* *
* JJBSHOW3.C *
* *
* Copyright (c) 1989, JJB. All rights reserved. *
* *
* *
* This example shows you how to assign functions for initalizing and *
* leaving groups and options. *
* *
* 'init(functionname)' *
* 'leave(functionname)' *
* *
* Just glance and it and move on to example JJBSHOW3.C *
* *
* If you want to run this program, from DOS: *
* *
* Enter 'JJBS3' ( to load this file with JJB.QLB) *
* Press 'F5' ( to compile and begin executing) *
* *
* If you have any problems, see JJBREAD.ME 'problems'. *
* Otherwise you should be executing this program. *
* *
* You may press 'ALT' then select any option. *
* The option selected will be displayed in the bottom left of screen. *
* *
* JJB, 9236 church Rd suite 1082, Dallas, Tx 75231 (214) 341-1635 *
***************************************************************************/
/***************************************************************************
* *
* To make an .exe file JJBSHOW3.EXE for this program, from DOS enter: *
* *
* QCL /c /AM JJBSHOW3.C *
* LINK JJBSHOW3.OBJ + JJB.OBJ,,, C:LIB\, *
* *
***************************************************************************/
/* see JJBGLOSS.DOC for an explanation of the JJB functions below */
main()
{
jjb_initalize(); /* initalizes JJB */
jjb_setup(); /* setup options & assign functions */
jjb_start(); /* start executing the default option */
}
/* The function below uses some of the functions in the JJB hidden library.*/
video_message() {
vloc(10,20); /* position the video fast cursor */
vfsc("This message will appear on the screen.");
get_ch();
}
init_update() {
/* you can place any C functions here to initalize the group. */
}
leave_update() {
/* you can place any C functions here to leave the group. */
}
init_vid_msg() {
/* you can place any functions here to initalize an option.*/
vloc(4,55); vfs("initalize message, etc.");
}
leave_vid_msg() {
/* you can place any functions here to leave an option.*/
}
/****************************************************************************
* *
* jjb_setup() *
* *
* jjb_setup() is where you should define how your pull down menus will *
* for each group and option. *
* *
* This example shows you how to initialize and leave groups and options. *
* *
* initalizing and leaving functions for groups and options are not *
* required. They are optional and to be used only if you need them. *
* *
****************************************************************************/
jjb_setup() {
group("Update");
init(init_update);
leave(leave_update);
option("Video a message on the screen");
funct(video_message);
init(init_vid_msg);
leave(leave_vid_msg);
option("Update Customer file");
}